<template>
  <div class="production-table" id="ProductionTable">
    <div class="table-title">
      <div class="navigation-title">
        <div
          :class="['tabs-box']"
          v-for="item in toptabsList"
          :key="item.type"
          @click="toptabsFun(item)"
        >
          {{ item.name }}
        </div>
      </div>
    </div>
    <div class="table-box">
      <a-table
        className="components-table-demo-nested"
        :columns="tableColumns"
        :row-key="(record) => record.MaterialCode"
        :data-source="list"
        :loading="tableLoading"
        :scroll="{ y: tableHegint }"
        :pagination="false"
        size="middle"
      >
        <template slot="action" slot-scope="text, record">
          <div class="chart-manage">
            <a-icon type="edit" class="icon-class" @click="editFun(record)" />
          </div>
        </template>
      </a-table>
    </div>

   
  </div>
</template>

<script>

import GeneralButton from "@/components/be-current-btn.vue";

//工序列表

export default {
  props: ["RouteID", "technoLogyInfo", "upCurrentRow", "list"],
  components: {
    GeneralButton,
    FormulaDetailForm,
  },
  data() {
    return {
      tableHegint: 0, //工序表格高度
      toptabsList: [
        {
          name: "工序",
          type: 1,
          cName: "ProductionTable",
          clickName: "addprocessshowFun",
        },
      ], //工序Tab列表
      toptabsInfo: {
        name: "工序",
        type: 1,
        cName: "ProductionTable",
        clickName: "addprocessshowFun",
      }, //工序Tab选择后信息
      currentRow: {
        MaterialCode: "",
        MaterialName: "",
        Quantity: 0,
        ReferenceAmount: 0,
        OrigQuantity: 0,
      }, //当前选中行信息
      isEditShow: false, //修改弹窗
      tableLoading: false, //序号表格loading
      tableColumns, //序号表头
    };
  },
  methods: {
   
    upFun() {
      this.$emit("upCurrentRow");
    },
  },
  computed: {
    showIdFun: function () {
      return this.RouteID;
    },
  },

  
};
</script>

<style lang="less" scoped>
.production-table {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.table-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.625rem;
  align-items: center;
  .navigation-title {
    .tabs-box {
      margin: 0 0.625rem;
      color: #000000;
      padding: 0.3125rem 1.875rem;
      font-weight: 700;
      font-size: 1.125rem;
    }
  }
  .navigation-button {
    display: flex;
    button:nth-child(1) {
      margin-right: 1.25rem;
    }
  }
}
.table-box{
    flex: 1;
    overflow: auto;
  }
/deep/ .clickRowStyl {
  background: #e6f7ff !important;
  color: #000000 !important;
}
/deep/.ant-table-body {
  &::-webkit-scrollbar {
    margin: 0.2rem;
    //整体样式
    height: 0.4125rem;
    width: 0.3rem;
  }

  &::-webkit-scrollbar-thumb {
    //滑动滑块条样式
    border-radius: 0.625rem;
    -webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.2);
    background: #009a9a;
    // background: rgba(2, 35, 60, 1);
  }

  &::-webkit-scrollbar-track {
    //轨道的样式
    -webkit-box-shadow: 0;
    border-radius: 0.625rem;
    background: #ccc;
  }

  &::-webkit-scrollbar-corner {
    background: red;
  }
}
/deep/.ant-table-header {
  overflow-y: hidden !important;
}
.operation {
  background-color: #ffffff;
  padding: 0.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  .operation-search {
    display: flex;
    justify-content: flex-end;
    border-bottom: 2px solid #f0f2f5;
    margin-bottom: 0.9375rem;
  }
  .table-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;

    .operation-table {
      flex: 1;
      display: flex;
      flex-direction: column;
      height: 100%;
      overflow: hidden;
      .operation-table-box {
        height: 100%;
        flex: 2;
      }
    }
    .workunit-table {
      flex: 1;
      border: 1px solid #dddddd;
      border-radius: 0.625rem;
      padding: 0.9375rem;
      .workunit-title {
        margin-bottom: 0.625rem;
      }
    }
  }
}
</style>
